<template>
  <div class="_system">
    <el-form ref="submitInfo" :model="form" label-width="110px" :label-position="`top`" v-if="form.setup">
      <el-form-item label="网站名称" prop="name">
        <el-input size="small" v-model="form.setup.name" style="width:400px; float: left;margin-right: 20px;"></el-input>
        <div class="tis">填写网站名称</div>
      </el-form-item>
      <el-form-item label="Keywords" prop="name">
        <el-input size="small" v-model="form.setup.keywords" style="width:400px; float: left;margin-right: 20px;"></el-input>
        <div class="tis">填写网站关键词</div>
      </el-form-item>
      <el-form-item label="Description" prop="description">
        <el-input size="small" type="textarea" style="width:400px; float: left;margin-right: 20px;" v-model="form.setup.description"></el-input>
        <div class="tis">填写网站描述</div>
      </el-form-item>
      <el-form-item label="服务器地址" prop="name">
        <el-input size="small" v-model="form.setup.serverUrl" style="width:400px; float: left;margin-right: 20px;"></el-input>
        <div class="tis">填写服务器地址</div>
      </el-form-item>
      <el-form-item label="文件上传方式" prop="upload_type">
        <el-radio-group v-model="form.setup.upload_type" size="mini">
          <el-radio border v-for="item in upload_type_all" :key="item.value" :label="item.value">{{item.label}}</el-radio>
        </el-radio-group>
        <div class="tis">默认为本地上传、可选七牛云上传</div>
      </el-form-item>
      <el-form-item label="微信号" prop="weixin">
        <el-input size="small" type="input" style="width:400px;float: left;margin-right: 20px;" v-model="form.setup.weixin"></el-input>
        <div class="tis">填写微信号</div>
      </el-form-item>
      <el-form-item label="电 话" prop="tel">
        <el-input size="small" type="input" style="width:400px;float: left;margin-right: 20px;" v-model="form.setup.tel"></el-input>
        <div class="tis">填写电话(400-8888-8888)</div>
      </el-form-item>
      <el-form-item label="邮 箱" prop="tel">
        <el-input size="small" type="input" style="width:400px;float: left;margin-right: 20px;" v-model="form.setup.email"></el-input>
        <div class="tis">填写邮箱(***@163.com)</div>
      </el-form-item>
      <el-form-item label="版权信息" prop="copyright">
        <el-input size="small" type="textarea" style="width:400px;float: left;margin-right: 20px;" v-model="form.setup.copyright"></el-input>
        <div class="tis">版权信息</div>
      </el-form-item>
      <el-form-item label="底部信息" prop="bottomInfo">
        <el-input size="small" type="textarea" style="width:400px;float: left;margin-right: 20px;" v-model="form.setup.bottomInfo"></el-input>
        <div class="tis">填写底部需要加载的JS代码或流量统计代码</div>
      </el-form-item>
    </el-form>
    <div class="dialog-footer">
      <el-button size="small" type="primary" style="margin-top: 10px" @click="submitInfo('submitInfo',form)">确 定</el-button>
    </div>
  </div>
</template>
<script>
import _mixins from './mixins'
export default {
  name: 'setup',
  mixins: [_mixins],
  data() {
    return {
      upload_type_all: [{
        value: '1',
        label: '本地'
      }, {
        value: '2',
        label: '七牛云'
      }]
    }
  },
  props: {
    value: {
      type: Object
    }
  },
  computed: {
    form: {
      get: function() {
        return this.value
      },
      set: function(val) {
        this.$emit('input', val)
      }
    }
  }
}

</script>
